package com.chinasoft.tw.service;

import com.chinasoft.tw.pojo.Info;
import com.chinasoft.tw.service.ChangXinyue.ChangXinyue;
import com.chinasoft.tw.service.Chenmr.Chen;
import com.chinasoft.tw.service.LCH.lch;
import com.chinasoft.tw.service.Luoruijie.Luoruijie;
import com.chinasoft.tw.service.MaYun.MyTrue;
import com.chinasoft.tw.service.Mr.liu.Liu;
import com.chinasoft.tw.service.StudentDR.StudentDR;
import com.chinasoft.tw.service.Studentwxy.Studentwxy;
import com.chinasoft.tw.service.aixin.AXtrue;
import com.chinasoft.tw.service.djl.DJL;
import com.chinasoft.tw.service.lc.LcTrue;
import com.chinasoft.tw.service.lj.Lj;
import com.chinasoft.tw.service.ljy.ljytrue;
import com.chinasoft.tw.service.lmc.Lmc;
import com.chinasoft.tw.service.lmy.lmy;
import com.chinasoft.tw.service.longyujie.longyujie;
import com.chinasoft.tw.service.lxy.lixuanyi;
import com.chinasoft.tw.service.rain.RainPOST;
import com.chinasoft.tw.service.songzheng.SongZheng;
import com.chinasoft.tw.service.sorry.S0rry;
import com.chinasoft.tw.service.student000.Student000;
import com.chinasoft.tw.service.student60.Student60;
import com.chinasoft.tw.service.studentone.StudentOne;
import com.chinasoft.tw.service.studentwf.studentwf;
import com.chinasoft.tw.service.studentzyy.StudentZyy;
import com.chinasoft.tw.service.vmzh.zhtrue;
import com.chinasoft.tw.service.wangqs.qsw;
import com.chinasoft.tw.service.xiaomaomi.xiaomaomi;
import com.chinasoft.tw.service.yyb.yyb;
import com.chinasoft.tw.service.zfy.zfy;
import com.chinasoft.tw.service.zhangwen.ZwTrue;
import com.chinasoft.tw.service.zzp.ZZP;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

@Service
public class TrueWordService {
    List<TrueWord> studentList = new ArrayList<>();
    Random random = new Random();

    // 构造方法
    public TrueWordService() {
        TrueWord tw1 = new ZwTrue();
        studentList.add(tw1);
        // 添加其他 同学
        lch LCH = new lch();
        studentList.add(LCH);

        StudentOne studentOne = new StudentOne();
        studentList.add(studentOne);


        studentwf wf = new studentwf();
        studentList.add(wf);


        ZZP zzp = new ZZP();
        studentList.add(zzp);

        AXtrue aXtrue = new AXtrue();
        studentList.add(aXtrue);

        Chen chen = new Chen();
        studentList.add(chen);
        studentList.add(new longyujie());
        studentList.add(new LcTrue());
        studentList.add(new Lj());
        studentList.add(new ljytrue());
        studentList.add(new Luoruijie());
        studentList.add(new lixuanyi());
        studentList.add(new MyTrue());
        studentList.add(new Liu());
        studentList.add(new S0rry());
        studentList.add(new Student60());
        studentList.add(new Studentwxy());
        studentList.add(new StudentZyy());
        studentList.add(new zhtrue());
        studentList.add(new qsw());
        studentList.add(new xiaomaomi());
        studentList.add(new zfy());
//        studentList.add(new Zhangzhehang());
        studentList.add(new ZZP());
        studentList.add(new DJL());
        StudentDR studentDR = new StudentDR();
        studentList.add(studentDR);
        studentList.add(new SongZheng());
        studentList.add(new lmy());
        studentList.add(new yyb());
        // three

        // last

        // lmc
        Lmc lmc = new Lmc();
        studentList.add(lmc);


        Student000 fyl = new Student000();
        studentList.add(fyl);

        RainPOST rainPOST = new RainPOST();
        studentList.add(rainPOST);

        ChangXinyue changXinyue = new ChangXinyue();
        studentList.add(changXinyue);

    }

    public Info getAllWord() {
        int index = random.nextInt(studentList.size());
        TrueWord tw = studentList.get(index);
        Info info = tw.getTrueWord();
        return info;
    }
}

